package test;

import gui.loginGUI;
import gui.welcomeScreenGUI;
import database.MainOperations;


public class Main 
{
	public static String dataConn = "KeythHome";
	//public static String dataConn = "KeythTallaght";
	//public static String dataConn = "GaryHome";
	//public static String dataConn = "GaryTallaght";
	
	
	public static String username;
	public static int userId;
	public static boolean firstTime;
	private MainOperations ma;
	public Main(MainOperations m)
	{
		this.ma=m;
		firstTime=ma.checkTable();
		ma.closeDB();
		
		if(firstTime==true)
		{
			loginGUI lg=new loginGUI();
			lg.setVisible(true);
		}
		else
		{
			welcomeScreenGUI wsg=new welcomeScreenGUI();
			wsg.setVisible(true);
		}
		
		
	}
	public static void main(String[] args) 
	{
		MainOperations m=new MainOperations();
		new Main(m);
	}

}
